﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using BAL;
using System.Data;

namespace BAL
{
    public class NhaSXBus
    {
        public string LoadMenu()
        {

            DataTable dt = DBConnection.getALL("sp_getAllNhaSX");
            string strHTML = "";
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                strHTML += "<li class=\"odd\"><a href=\"" + "LoaiSanPham.aspx?MaNSX=" + dt.Rows[i]["MaNSX"] + "\">" + dt.Rows[i]["TenNSX"] + "</a></li>";
            }
            return strHTML;
        }
        public DataTable LoadSPDacBien()
        {

            DataTable dt = DBConnection.getALL("sp_getSanPhamByGiaMax");
            string strHTML = "<div class=\"product_title\"><a href=\"details.html\">" + dt.Rows[0]["TenSP"] + "</a></div>\n";
            strHTML += "<div class=\"product_img\"><a href=\"details.html\"><img src=\"images/"+dt.Rows[0]["Image1"]+"\" alt=\"\" border=\"0\" /></a></div>\n";
            strHTML += "<div class=\"prod_price\"><span class=\"price\">"+dt.Rows[0]["DonGia"]+"</span></div>";
            return dt;

        }
    }
}
